import subprocess

# 定义要执行的命令
command = 'cmd /c node d:\\develop\\Node\\stm32LED\\get.js'

# 打开 cmd 并执行命令
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

# 获取命令执行的输出
output, error = process.communicate()

# 打印输出
if output:
    print(output.decode('utf-8'))
if error:
    print(error.decode('utf-8'))